<layout name="all@index/layout" />
<script type="text/javascript">
    function user_resetself(){
        if(!$('#fm').form('validate'))
            return;
        var oldpwd=$('#oldpwd').val();
        var newpwd=$('#password').val();
        $.post('{$ROOT}/admin/set/changepwd',{oldpwd:oldpwd,newpwd:newpwd},function(result){
            if (result.status==1){
                $.messager.alert('成功',result.info,'info');
                $('#fm').form('clear');
            }
            else {
                $.messager.alert('错误',result.info,'error');

            }
        },'json');
    }
</script>
<div class="container">
    <div class="easyui-panel" title="您的密码过于简单或已过期，请修改密码">
        <div style="padding:10px 0 10px 60px;margin:0 auto">
            <form id="fm" method="post">
                <div class="pagetitle">修改密码</div>
                <table class="mytable" align="center" cellspacing="0" cellpadding="0">
                    <tr>
                        <th>旧密码:</th>
                        <td><input class="easyui-validatebox" type="password" name="oldpwd" id="oldpwd"></td>
                    </tr>
                    <tr>
                        <th>新密码:</th>
                        <td><input id="password" class="easyui-validatebox" type="password" name="newpwd" data-options="validType:'complex'"></td>
                    </tr>
                    <tr>
                        <th>再一次:</th>
                        <td><input class="easyui-validatebox" type="password" name="rnewpwd" validType="equals['#password']" onkeydown="if(event.keyCode==13) user_resetself();"></td>
                    </tr>
                </table>
            </form>
        </div>
        <div style="text-align:center;padding:5px">
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="user_resetself()">提交</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm('#fm')">清空</a>
        </div>
    </div>
</div>